package com.edu.his.controller;

import com.edu.his.domain.CheckRequest;
import com.edu.his.domain.Common;
import com.edu.his.service.CheckRequestService;
import com.edu.his.service.CommonService;
import com.edu.his.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.w3c.dom.stylesheets.LinkStyle;

import java.util.List;

/**
 * 描述：
 * 创建人：飘
 * 创建时间：2024/12/20
 **/
@RestController
@RequestMapping("/common")
@CrossOrigin(value = "*",maxAge = 3600)
public class CommonController {
    @Autowired
    private CommonService commonService;

    @GetMapping("/selectbyregister/{registerId}")
    public R selectByRegiserId(@PathVariable("registerId") Integer registerId) {
        return  this.commonService.selectByRegiserId(registerId);
    }

    @PostMapping("/updatestate")
    public R selectByRegiserId(@RequestBody List<Common> list) {
        return  this.commonService.updateState(list);
    }




}
